<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>氦闪</title>
    <link rel="stylesheet" href="__PUBLIC__/web/css/swiper.min.css">
    <link rel="stylesheet" href="__PUBLIC__/web/css/public.css">
    <link rel="stylesheet" href="__PUBLIC__/web/css/pay.css">
</head>
<body>


<header>
    <include file="Index/header"/>
</header>


<include file="Index/left"/>
</div>
<section>
    <div class="ly-content ly-cent">
        <div class="ly-title">
            支付
        </div>
        <div class="ly-pay">
            <h1>请选择支付方式</h1>
            <ul class="ly-list">
                <li class="ly-btn" pay_type="alipay">
                    <img src="__PUBLIC__/web/images/icon_pay_1.png"/>
                    支付宝
                </li>
                <li class="ly-btn wx_code" pay_type="wxpay">
                    <img  src="__PUBLIC__/web/images/icon_pay_2.png"/>
                    微信支付
                </li>

                <!--支付成功后的界面，链接要删除-->
                <!--<p>-->
                    <!--<a href="over.html">支付成功后的界面，链接要删除</a>-->
                <!--</p>-->
                <!---->

                <li>
                    <a href="{:U('Index/contact')}">支付有问题？</a>
                </li>


            </ul>


            <!--<div class="swiper-container ly-ping-pai">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <img src="__PUBLIC__/web/images/img_show.png"/>
                    </div>
                    <div class="swiper-slide">
                        <img src="__PUBLIC__/web/images/img_show.png"/>
                    </div>
                    <div class="swiper-slide">
                        <img src="__PUBLIC__/web/images/img_show.png"/>
                    </div>
                    <div class="swiper-slide">
                        <img src="__PUBLIC__/web/images/img_show.png"/>
                    </div>
                </div>
            </div>-->
        </div>
    </div>
    <include file="Index/footer"/>
</section>

<div class="ly-layer ">
    <div class="ly-code">
        <img id="wx_pay" src="__PUBLIC__/web/images/img_code.png"/>
        <p>扫描二维码立即支付！</p><p>完成支付？<a style="color: blue;" href="{:U('Index/user')}" class="ly-a">我的订单</a></p>
        <img src="__PUBLIC__/web/images/icon_close.png" class="ly-close" />
    </div>
</div>

<div class="ly-menu-nav" data-id="1">
    <img src="__PUBLIC__/web/images/icon_menu.png"/>
</div>
</body>
<script src="__PUBLIC__/web/js/jquery.min.js"></script>
<script src="__PUBLIC__/web/js/swiper.min.js"></script>
<!--<script src="__PUBLIC__/js/common.js"></script>-->
<!--<script src="__PUBLIC__/js/artDialog/artDialog.js"></script>-->
<script src="__PUBLIC__/web/js/public.js"></script>
<script>
    $(document).ready(function () {
        var sUserAgent = navigator.userAgent.toLowerCase();
        var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
        var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
        var bIsMidp = sUserAgent.match(/midp/i) == "midp";
        var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
        var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
        var bIsAndroid = sUserAgent.match(/android/i) == "android";
        var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
        var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
        if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
        } else {
            $('.wx_code').hide();
        }
    })
    $(".ly-list").on("click", ".ly-btn", function () {
        $(this).addClass("ly-cation").siblings().removeClass("ly-cation");
        // alert($(this).attr('pay_type'));

        var  pay_type = $(this).attr('pay_type');
        if(pay_type == 'alipay') {
            var sUserAgent = navigator.userAgent.toLowerCase();
            var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
            var bIsMidp = sUserAgent.match(/midp/i) == "midp";
            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
            var bIsAndroid = sUserAgent.match(/android/i) == "android";
            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
            if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
                var url = "{:U('doAlipay')}";
                window.location.href=url+'/order_id/'+"{$id}";
            } else {
                window.location.href="{:U('Cart/payOrder')}"+'/order_id/'+"{$id}";
            }

        } else {
            var url = "{:U('wxPay')}";
            // open_iframe_dialog_re(url+'&order_id='+"{$order_id}"+'&mid='+"{$mid}", '微信支付');
            $("#wx_pay").attr('src', url+'/order_id/'+"{$id}");
            // alert('如您使用手机端微信支付请保存二维码用微信扫一扫付款');
            /*var sUserAgent = navigator.userAgent.toLowerCase();
            var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
            var bIsMidp = sUserAgent.match(/midp/i) == "midp";
            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
            var bIsAndroid = sUserAgent.match(/android/i) == "android";
            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
            if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
                alert('如您使用手机端微信支付请保存二维码用微信扫一扫付款');
            }*/
            // if(confirm('如您使用手机端微信支付请保存二维码用微信扫一扫付款。')) {
                $(".ly-layer").show();
            // }
            // window.location.href = url+'/order_id/'+"{$id}";
        }

    })
    var mySwiper = new Swiper('.ly-ping-pai', {
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        autoplay: {
            delay: 5000,
            stopOnLastSlide: false,
            disableOnInteraction: true,
        },
        loop: true
    });

    $(".ly-close").on("click",function () {
        $(".ly-layer").hide();
    })





</script>
</html>





